class Person():
    def __init__(self, name, gender, age, capacity):
        self.name = name
        self.gender = gender
        self.age = age
        self.capacity = capacity
        self.actions = {
            '草丛战斗': {'power': -200, 'message': '参加一次草丛战斗'},
            '自我修炼': {'power': 100, 'message': '自我修炼了一次'},
            '多人游戏': {'power': -500, 'message': '参加一次多人游戏'},
        }
        self.print_info()

    def print_info(self):
        print(f'姓名: {self.name}; 性别: {self.gender} ; 年龄: {self.age} ; 战斗力：{self.capacity}')

    def take_action(self, action_name):
        action = self.actions[action_name]
        print(f'{self.name} {action["message"]}')
        self.capacity = self.capacity + action['power']


if __name__ == '__main__':
    print('——————游戏初始——————')
    bb = Person('冰冰', '女', 18, 1000)
    mm = Person('木木', '男', 20, 1900)
    ll = Person('幂幂', '女', 19, 2300)
    print('\n——————开始游戏——————')

    bb.take_action('多人游戏')
    mm.take_action('自我修炼')
    ll.take_action('草丛战斗')
    print('')

    bb.print_info()
    mm.print_info()
    ll.print_info()